<script setup lang="ts">
const dynamicJs = (colorCondition) => {
  const value = { name: '张三', age: 18 }
  return eval(colorCondition)
}
console.log(dynamicJs("value.age>18?'red':'black'"))
</script>

<template>我是测试</template>
